#ifndef MACRO_H
#define MACRO_H

//#define EIGEN_DONT_VECTORIZE
//#define EIGEN_DISABLE_UNALIGNED_ARRAY_ASSERT

#define DEGTORAD(A)	((A * M_PI) / 180.0f)
#define RADTODEG(A)	((A * 180.0f) / M_PI)

#define MAX_IK_TRIES 500
#define IK_POS_THRESH 1e-6

#define POS_THRESH 1e-2

#define ICX 0.525731112119133606f
#define ICZ 0.850650808352039932f

#define GRAVITY -9.81

#define JFMAX 200
#define JVEL 0.0

//#define WCFM 0.2
#define WCFM 1e-6
#define WERP 0.1
#define SIMSTEP 0.002

#define MAX_CON_NUM 4

#include <Eigen/Dense>
#include <Eigen/StdVector>
#include <Random>
#include <ctime>

using namespace Eigen;
using namespace std;

class Macro
{
public:
	static bool s_mouseControl;
	static bool s_record;
	static bool s_replay;
	static Vector3d s_mousePos;
	static double s_timeStep;
	static int s_replayIters;
	static float s_mu1;
	static float s_mu2;
	static double s_gain;
	static double s_maxForce;
	static bool s_motorNoise;
	static bool s_sensorNoise;
public:
	static void reset();
public:
	EIGEN_MAKE_ALIGNED_OPERATOR_NEW
};
#endif